-- GENERATED SPELL FOR [Vir'aani Arcanist] --


function spell0_17150(pUnit, Event) --@Arcane Bolt,n/a--
pUnit:FullCastSpellOnTarget(13901,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17150', 2500, 1)
end

function spell1_17150(pUnit, Event) --@Arcane Explosion,Self--
pUnit:FullCastSpellOnTarget(22938,pUnit)
pUnit:RegisterEvent('Sorts_17150', 1000, 1)
end

function spell2_17150(pUnit, Event) --@Blink,Self--
pUnit:FullCastSpellOnTarget(14514,pUnit)
pUnit:RegisterEvent('Sorts_17150', 1269, 1)
end

function spell3_17150(pUnit, Event) --@Vir\'aani Concentration,Self--
pUnit:FullCastSpellOnTarget(33839,pUnit)
pUnit:RegisterEvent('Sorts_17150', 572, 1)
end

function Sorts_17150(pUnit, Event)
local choix_sorts_17150 = math.random(0, 3)
if choix_sorts_17150 == 0 then
pUnit:RegisterEvent('spell0_17150', 1, 1)
end
if choix_sorts_17150 == 1 then
pUnit:RegisterEvent('spell1_17150', 1, 1)
end
if choix_sorts_17150 == 2 then
pUnit:RegisterEvent('spell2_17150', 1, 1)
end
if choix_sorts_17150 == 3 then
pUnit:RegisterEvent('spell3_17150', 1, 1)
end
end

function mob17150_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17150', math.random(1500, 3000), 1)
end

function mob17150_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17150_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17150_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17150, 1, 'mob17150_Action')
RegisterUnitEvent(17150, 2, 'mob17150_Leave')
RegisterUnitEvent(17150, 3, 'mob17150_Kill')
RegisterUnitEvent(17150, 4, 'mob17150_Die')
